import 'package:flutter/material.dart';
import 'package:weixinclone/bean/ConversionBean.dart';
import 'package:weixinclone/Constants.dart'
    show Constants, AppColors, AppStyles, Contants;
import 'package:weixinclone/bean/DeviceBean.dart';

// ignore: non_abstract_class_inherits_abstract_member_one
class DeviceInfoItemPage extends StatelessWidget {
  DeviceBean _deviceBean;

  DeviceInfoItemPage(this._deviceBean);

  @override
  Widget build(BuildContext context) {
    return Container(
      padding:
          EdgeInsets.only(left: 24.0, top: 10.0, right: 24.0, bottom: 10.0),
      decoration: BoxDecoration(
          color: Color(AppColors.DeviceInfoItemBg),
          border: Border(
              bottom: BorderSide(
                  width: Constants.DividerWidth,
                  color: Color(AppColors.DividerColor)))),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Icon(
            IconData(
              _deviceBean.icon,
              fontFamily: Contants.IconFontFamily,
            ),
            size: 24.0,
            color: Color(AppColors.DividerColor),
          ),
          SizedBox(width: 16.0),
          Text(
            _deviceBean.title,
            style: AppStyles.DeviceInfoItemTextStyle,
          )
        ],
      ),
    );
  }
}
